feat: document transient payload passthrough in elements#2499
Open
jonas-jonas wants to merge 5 commits into
Open
feat: document transient payload passthrough in elements#2499jonas-jonas wants to merge 5 commits into
jonas-jonas wants to merge 5 commits into
Conversation
04b53cd to
8d8121c
Compare
jonas-jonas
commented
Apr 7, 2026
Co-authored-by: Jonas Hungershausen <jonas.hungershausen@gmail.com>
unatasha8
reviewed
Apr 8, 2026
unatasha8
reviewed
Apr 8, 2026
Member
|
is this already released? |
Co-authored-by: unatasha8 <una.cogavin@ory.sh>
There was a problem hiding this comment.
Pull request overview
Adds a new Ory Elements guide explaining how to use Kratos transient payload passthrough via the transientPayload prop on self-service flow components, including static and dynamic examples.
Changes:
- Introduces a new MDX guide page under Elements guides for transient payload passthrough.
- Documents both static object payloads and dynamic function-based payloads with Next.js/React examples.
- Links to the existing Ory Actions/Webhooks guide for broader webhook context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+9
| Transient payload is an Ory Kratos concept, that allows users of the APIs to pass data through to webhooks. All self-service | ||
| Kratos flows support transient payloads, and they are passed through to the webhooks as JSON objects. This allows you to use the | ||
| data in your webhooks, for example to customize the user experience or to trigger specific actions based on the data. |
Comment on lines
+11
to
+14
| Ory Elements allows defining transient payloads on the self-service flow components. To do this, you can use the | ||
| `transientPayload` prop on the self-service flow components. The value of this prop should be an object that contains the data you | ||
| want to pass through to the webhooks or a function that returns such an object. The data will be passed through to the webhooks as | ||
| JSON objects. |
| @@ -0,0 +1,84 @@ | |||
| --- | |||
| id: transient-payload | |||
| title: Transient Payload passthrough | |||
|
|
||
| - [Read more about webhooks in Ory](../../guides/integrate-with-ory-cloud-through-webhooks.mdx) | ||
|
|
||
| ## Static Transient Payload |
| } | ||
| ``` | ||
|
|
||
| ## Dynamic Transient Payload |
Comment on lines
+56
to
+58
| In this example, we define a dynamic transient payload that contains the user's preferred language. The function is called when | ||
| the user submits the form and the API request is made. This allows you to pass dynamic data to the webhooks, based on the user's | ||
| input or other factors. |
| <Registration | ||
| flow={flow} | ||
| config={config} | ||
| transientPayload={(formValues) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Further comments